
(async () => {

    var db = require('mysql2-promise')();

    console.log(db);
    // 设置连接配置
    db.configure = {
        host:'localhost:3306',
        user:'root',
        password:'luul5829435',
        database:'movie'
    }   
    console.log('配置',db);

    db.query('UPDATE movie SET key = ?', ['value']).then(function () {
        return db.query('SELECT * FROM movie');
    }).spread(function (rows) {
        console.log('Look at all the movie', rows);
    });





})()